package com.ruoyi.system.domain.idclazz;

import jakarta.persistence.Id;
import lombok.Data;

import java.util.Objects;

@Data
public class SysRoleMenuId {
	/** 角色ID */
	@Id
	private Long roleId;

	/** 菜单ID */
	@Id
	private Long menuId;

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		SysRoleMenuId that = (SysRoleMenuId) o;
		return Objects.equals(roleId, that.roleId) && Objects.equals(menuId, that.menuId);
	}

	@Override
	public int hashCode() {
		return Objects.hash(roleId, menuId);
	}
}
